package com.hz.ruoyiseller.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hz.rouyigonggong.domain.LgInboundOrder;
import com.hz.rouyigonggong.domain.LgSeller;
import com.hz.rouyigonggong.domain.LgSellerInfo;
import com.hz.ruoyiseller.dto.LgSellerInfoDTO;
import com.hz.ruoyiseller.dto.LgSellerOutInfoDTO;
import com.hz.ruoyiseller.mapper.LgSellerInfoMapper;
import com.hz.ruoyiseller.mapper.LgSellerMapper;
import com.hz.ruoyiseller.queryentity.LgSellerInfoQueryEntity;
import com.hz.ruoyiseller.service.LgSellerInfoService;
import com.hz.ruoyiseller.service.LgSellerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 卖家Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-06
 */
@Service
public class LgSellerInfoServiceImpl extends ServiceImpl<LgSellerInfoMapper, LgSellerInfo> implements LgSellerInfoService {
    @Autowired
    private LgSellerInfoMapper lgSellerInfoMapper;


    @Override
    public List<LgSellerInfoDTO> getList(LgSellerInfoQueryEntity lgSellerInfoQueryEntity) {
        return lgSellerInfoMapper.getList(lgSellerInfoQueryEntity);
    }

    @Override
    public List<LgSellerOutInfoDTO> getOutList(Integer sellerId,Integer goodsId) {
        return lgSellerInfoMapper.getOutList(sellerId,goodsId);
    }

    @Override
    public LgInboundOrder getSellerIdAndGoodsId(Integer sellerInfoId) {
        return lgSellerInfoMapper.getSellerIdAndGoodsId(sellerInfoId);
    }

    @Override
    public LgSellerInfo getSellerInfoIdBySellerIdAndGoodsId(Integer sellerId, Integer goodsId) {
        return lgSellerInfoMapper.getSellerInfoIdBySellerIdAndGoodsId(sellerId,goodsId);
    }

    @Override
    public int updateSellerInfo(LgSellerInfo lgSellerInfo) {
        return lgSellerInfoMapper.updateSellerInfo(lgSellerInfo);
    }

    @Override
    public int insertSellerInfo(LgSellerInfo lgSellerInfo) {
        return lgSellerInfoMapper.insertSellerInfo(lgSellerInfo);
    }

    /**
     * 批量删除卖家
     * 
     * @param sellerIds 需要删除的卖家主键
     * @return 结果
     */
    @Override
    public int deleteLgSellerBySellerIds(String[] sellerIds)
    {
        return lgSellerInfoMapper.deleteLgSellerBySellerIds(sellerIds);
    }

   }
